function [sim_musclevector] = sim_musclevector_operator(syn_a, syn_b)
%SIM_OPERATOR Summary of this function goes here
%   syn_a, syn_b are both structs
%   syn_a.C
%   syn_a.U, dimensionality of U = # of synergy components
%   syn_a.D, syn_a.EMG, syn_a.VAF, syn_a.NUM_TRIAL, syn_a.NUM_COMPONENT

sim_musclevector = zeros(syn_a.NUM_COMPONENT, syn_b.NUM_COMPONENT);

for k1 = 1:syn_a.NUM_COMPONENT
    for k2 = 1:syn_b.NUM_COMPONENT
        inner_prod = sum(syn_a.U(:,k1) .* syn_b.U(:,k2));
        sim_musclevector(k1, k2) = inner_prod/(norm(syn_a.U(:,k1))*norm(syn_b.U(:,k2)));
    end
end

end
